using System;
using System.Globalization;
using ns20;

namespace Newtonsoft.Json
{
	[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Parameter, AllowMultiple = false)]
	public sealed class JsonConverterAttribute : Attribute
	{
		private readonly Type type_0;

		public Type ConverterType => type_0;

		public JsonConverterAttribute(Type converterType)
		{
			if (converterType == null)
			{
				throw new ArgumentNullException("converterType");
			}
			type_0 = converterType;
		}

		internal static JsonConverter smethod_0(Type type_1)
		{
			try
			{
				return (JsonConverter)Activator.CreateInstance(type_1);
			}
			catch (Exception innerException)
			{
				throw new JsonException("Error creating {0}".smethod_0(CultureInfo.InvariantCulture, type_1), innerException);
			}
		}
	}
}
